<?php
// +----------------------------------------------------------------------
// | B5Yii2CMF V3.0 [快捷通用基础管理开发平台]
// +----------------------------------------------------------------------
// | Author: 冰舞 <357145480@qq.com>
// +----------------------------------------------------------------------

namespace api\modules\v1\controllers;


use api\modules\v1\AuthController;
use common\extend\exception\B5HttpException;


/**
 * 需要进行登录设置token的方法
 * Class UserController
 * @package api\modules\v1\controllers
 */
class UserController extends AuthController
{
    /**
     * 登录用户信息
     * @return array
     * @throws B5HttpException
     */
    public function actionLoginInfo(){
        $user = $this->getUser();
        $dept = $user->deptOne;

        return $this->success('',['info'=>$user->toArray(),'dept'=>$dept->toArray()]);
   }
}
